<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE DeriveDataTypeable #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE TypeFamilies #-}</span><span class="hs-cpp">
#if __GLASGOW_HASKELL__ &gt;= 703
</span><span class="hs-pragma">{-# LANGUAGE Unsafe #-}</span><span class="hs-cpp">
#endif
</span><span class="hs-pragma">{-# OPTIONS_HADDOCK not-home #-}</span><span>
</span><span id="line-8"></span><span>
</span><span id="line-9"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Module      : Data.ByteString.Lazy.Internal</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Copyright   : (c) Don Stewart 2006-2008</span><span>
</span><span id="line-12"></span><span class="hs-comment">--               (c) Duncan Coutts 2006-2011</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- License     : BSD-style</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- Maintainer  : dons00@gmail.com, duncan@community.haskell.org</span><span>
</span><span id="line-15"></span><span class="hs-comment">-- Stability   : unstable</span><span>
</span><span id="line-16"></span><span class="hs-comment">-- Portability : non-portable</span><span>
</span><span id="line-17"></span><span class="hs-comment">--</span><span>
</span><span id="line-18"></span><span class="hs-comment">-- A module containing semi-public 'ByteString' internals. This exposes</span><span>
</span><span id="line-19"></span><span class="hs-comment">-- the 'ByteString' representation and low level construction functions.</span><span>
</span><span id="line-20"></span><span class="hs-comment">-- Modules which extend the 'ByteString' system will need to use this module</span><span>
</span><span id="line-21"></span><span class="hs-comment">-- while ideally most users will be able to make do with the public interface</span><span>
</span><span id="line-22"></span><span class="hs-comment">-- modules.</span><span>
</span><span id="line-23"></span><span class="hs-comment">--</span><span>
</span><span id="line-24"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Data.ByteString.Lazy.Internal</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-25"></span><span>
</span><span id="line-26"></span><span>        </span><span class="annot"><span class="hs-comment">-- * The lazy @ByteString@ type and representation</span></span><span>
</span><span id="line-27"></span><span>        </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier">ByteString</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>     </span><span class="hs-comment">-- instances: Eq, Ord, Show, Read, Data, Typeable</span><span>
</span><span id="line-28"></span><span>        </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#chunk"><span class="hs-identifier">chunk</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-29"></span><span>        </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#foldrChunks"><span class="hs-identifier">foldrChunks</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-30"></span><span>        </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#foldlChunks"><span class="hs-identifier">foldlChunks</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-31"></span><span>
</span><span id="line-32"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Data type invariant and abstraction function</span></span><span>
</span><span id="line-33"></span><span>        </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#invariant"><span class="hs-identifier">invariant</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-34"></span><span>        </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#checkInvariant"><span class="hs-identifier">checkInvariant</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-35"></span><span>
</span><span id="line-36"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Chunk allocation sizes</span></span><span>
</span><span id="line-37"></span><span>        </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#defaultChunkSize"><span class="hs-identifier">defaultChunkSize</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-38"></span><span>        </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#smallChunkSize"><span class="hs-identifier">smallChunkSize</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-39"></span><span>        </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#chunkOverhead"><span class="hs-identifier">chunkOverhead</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-40"></span><span>
</span><span id="line-41"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Conversion with lists: packing and unpacking</span></span><span>
</span><span id="line-42"></span><span>        </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#packBytes"><span class="hs-identifier">packBytes</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#packChars"><span class="hs-identifier">packChars</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-43"></span><span>        </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#unpackBytes"><span class="hs-identifier">unpackBytes</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#unpackChars"><span class="hs-identifier">unpackChars</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-44"></span><span>
</span><span id="line-45"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-46"></span><span>
</span><span id="line-47"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Foldable.html#concat"><span class="hs-identifier">concat</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-48"></span><span>
</span><span id="line-49"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Data.ByteString.Internal.html"><span class="hs-identifier">Data.ByteString.Internal</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">S</span></span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Data.ByteString.html"><span class="hs-identifier">Data.ByteString</span></a></span><span>          </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">S</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.ByteString.html#length"><span class="hs-identifier">length</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.ByteString.html#take"><span class="hs-identifier">take</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.ByteString.html#drop"><span class="hs-identifier">drop</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-51"></span><span>
</span><span id="line-52"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Word.html#"><span class="hs-identifier">Data.Word</span></a></span><span>        </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier">Word8</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-53"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Foreign.Storable.html#"><span class="hs-identifier">Foreign.Storable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Foreign.Storable.html#Storable"><span class="hs-identifier">Storable</span></a></span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Foreign.Storable.html#sizeOf"><span class="hs-identifier">sizeOf</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-cpp">

#if MIN_VERSION_base(4,13,0)
</span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Semigroup.html#"><span class="hs-identifier">Data.Semigroup</span></a></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Semigroup"><span class="hs-identifier">Semigroup</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#sconcat"><span class="hs-identifier">sconcat</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-57"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.List.NonEmpty.html#"><span class="hs-identifier">Data.List.NonEmpty</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#NonEmpty"><span class="hs-identifier">NonEmpty</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#%3A%7C"><span class="hs-operator">(:|)</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-cpp">
#elif MIN_VERSION_base(4,9,0)
</span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Data.Semigroup</span><span>   </span><span class="hs-special">(</span><span class="hs-identifier">Semigroup</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-operator">&lt;&gt;</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">sconcat</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-60"></span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Data.List.NonEmpty</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">NonEmpty</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-operator">:|</span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-cpp">
#endif
</span><span class="hs-cpp">#if !(MIN_VERSION_base(4,8,0))
</span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Data.Monoid</span><span>      </span><span class="hs-special">(</span><span class="hs-identifier">Monoid</span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-cpp">
#endif
</span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../deepseq/src/Control.DeepSeq.html#"><span class="hs-identifier">Control.DeepSeq</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="../../deepseq/src/Control.DeepSeq.html#NFData"><span class="hs-identifier">NFData</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../deepseq/src/Control.DeepSeq.html#rnf"><span class="hs-identifier">rnf</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-66"></span><span>
</span><span id="line-67"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.String.html#"><span class="hs-identifier">Data.String</span></a></span><span>      </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.String.html#IsString"><span class="hs-identifier">IsString</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-68"></span><span>
</span><span id="line-69"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Typeable.html#"><span class="hs-identifier">Data.Typeable</span></a></span><span>            </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Typeable.Internal.html#Typeable"><span class="hs-identifier">Typeable</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-70"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Data.html#"><span class="hs-identifier">Data.Data</span></a></span><span>                </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Data.html#Data"><span class="hs-identifier">Data</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Data.html#mkNoRepType"><span class="hs-identifier">mkNoRepType</span></a></span><span class="hs-special">)</span><span class="hs-cpp">

#if MIN_VERSION_base(4,7,0)
</span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/GHC.Exts.html#"><span class="hs-identifier">GHC.Exts</span></a></span><span>                 </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Exts.html#IsList"><span class="hs-identifier">IsList</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-76"></span><span class="hs-comment">-- | A space-efficient representation of a 'Word8' vector, supporting many</span><span>
</span><span id="line-77"></span><span class="hs-comment">-- efficient operations.</span><span>
</span><span id="line-78"></span><span class="hs-comment">--</span><span>
</span><span id="line-79"></span><span class="hs-comment">-- A lazy 'ByteString' contains 8-bit bytes, or by using the operations</span><span>
</span><span id="line-80"></span><span class="hs-comment">-- from &quot;Data.ByteString.Lazy.Char8&quot; it can be interpreted as containing</span><span>
</span><span id="line-81"></span><span class="hs-comment">-- 8-bit characters.</span><span>
</span><span id="line-82"></span><span class="hs-comment">--</span><span>
</span><span id="line-83"></span><span class="hs-keyword">data</span><span> </span><span id="ByteString"><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-var">ByteString</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Empty"><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="Chunk"><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-var">Chunk</span></a></span></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="Data.ByteString.Internal.html#ByteString"><span class="hs-identifier hs-type">S.ByteString</span></a></span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span>
</span><span id="line-84"></span><span>    </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Typeable.Internal.html#Typeable"><span class="hs-identifier hs-type">Typeable</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-85"></span><span class="hs-comment">-- See 'invariant' function later in this module for internal invariants.</span><span>
</span><span id="line-86"></span><span>
</span><span id="line-87"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679074630"><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span>  </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-88"></span><span>    </span><span id="local-6989586621679074628"><span class="annot"><span class="annottext">== :: ByteString -&gt; ByteString -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var hs-var hs-var hs-var">(==)</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; Bool
</span><a href="Data.ByteString.Lazy.Internal.html#eq"><span class="hs-identifier hs-var">eq</span></a></span><span>
</span><span id="line-89"></span><span>
</span><span id="line-90"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679074612"><span id="local-6989586621679074614"><span id="local-6989586621679074616"><span id="local-6989586621679074618"><span id="local-6989586621679074620"><span id="local-6989586621679074622"><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Ord"><span class="hs-identifier hs-type">Ord</span></a></span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span></span></span></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-91"></span><span>    </span><span id="local-6989586621679074610"><span class="annot"><span class="annottext">compare :: ByteString -&gt; ByteString -&gt; Ordering
</span><a href="../../ghc-prim/src/GHC.Classes.html#compare"><span class="hs-identifier hs-var hs-var hs-var hs-var">compare</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; Ordering
</span><a href="Data.ByteString.Lazy.Internal.html#cmp"><span class="hs-identifier hs-var">cmp</span></a></span><span class="hs-cpp">

#if MIN_VERSION_base(4,9,0)
</span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679074604"><span class="annot"><a href="../../base/src/GHC.Base.html#Semigroup"><span class="hs-identifier hs-type">Semigroup</span></a></span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-95"></span><span>    </span><span id="local-6989586621679074602"><span class="annot"><span class="annottext">&lt;&gt; :: ByteString -&gt; ByteString -&gt; ByteString
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">(&lt;&gt;)</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#append"><span class="hs-identifier hs-var">append</span></a></span><span>
</span><span id="line-96"></span><span>    </span><span id="local-6989586621679074600"><span class="annot"><span class="annottext">sconcat :: NonEmpty ByteString -&gt; ByteString
</span><a href="#local-6989586621679074600"><span class="hs-identifier hs-var hs-var hs-var hs-var">sconcat</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679074599"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074599"><span class="hs-identifier hs-var">b</span></a></span></span><span class="annot"><a href="../../base/src/GHC.Base.html#%3A%7C"><span class="hs-operator hs-type">:|</span></a></span><span id="local-6989586621679074598"><span class="annot"><span class="annottext">[ByteString]
</span><a href="#local-6989586621679074598"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ByteString] -&gt; ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#concat"><span class="hs-identifier hs-var">concat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074599"><span class="hs-identifier hs-var">b</span></a></span><span class="annot"><span class="annottext">ByteString -&gt; [ByteString] -&gt; [ByteString]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[ByteString]
</span><a href="#local-6989586621679074598"><span class="hs-identifier hs-var">bs</span></a></span><span class="hs-special">)</span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-99"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-100"></span><span>    </span><span id="local-6989586621679074589"><span class="annot"><span class="annottext">mempty :: ByteString
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var hs-var hs-var hs-var">mempty</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span class="hs-cpp">
#if MIN_VERSION_base(4,9,0)
</span><span>    </span><span id="local-6989586621679074587"><span class="annot"><span class="annottext">mappend :: ByteString -&gt; ByteString -&gt; ByteString
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-identifier hs-var hs-var hs-var hs-var">mappend</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; ByteString
forall a. Semigroup a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">(&lt;&gt;)</span></a></span><span class="hs-cpp">
#else
</span><span>    </span><span class="hs-identifier">mappend</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">append</span><span class="hs-cpp">
#endif
</span><span>    </span><span id="local-6989586621679074586"><span class="annot"><span class="annottext">mconcat :: [ByteString] -&gt; ByteString
</span><a href="../../base/src/GHC.Base.html#mconcat"><span class="hs-identifier hs-var hs-var hs-var hs-var">mconcat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ByteString] -&gt; ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#concat"><span class="hs-identifier hs-var">concat</span></a></span><span>
</span><span id="line-107"></span><span>
</span><span id="line-108"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../deepseq/src/Control.DeepSeq.html#NFData"><span class="hs-identifier hs-type">NFData</span></a></span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-109"></span><span>    </span><span id="local-6989586621679074581"><span class="annot"><span class="annottext">rnf :: ByteString -&gt; ()
</span><a href="#local-6989586621679074581"><span class="hs-identifier hs-var hs-var hs-var hs-var">rnf</span></a></span></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-110"></span><span>    </span><span class="annot"><a href="../../deepseq/src/Control.DeepSeq.html#rnf"><span class="hs-identifier hs-var">rnf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-type">Chunk</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679074580"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074580"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ()
forall a. NFData a =&gt; a -&gt; ()
</span><a href="../../deepseq/src/Control.DeepSeq.html#rnf"><span class="hs-identifier hs-var">rnf</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074580"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-111"></span><span>
</span><span id="line-112"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679074575"><span id="local-6989586621679074577"><span class="annot"><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-113"></span><span>    </span><span id="local-6989586621679074569"><span class="annot"><span class="annottext">showsPrec :: Int -&gt; ByteString -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#showsPrec"><span class="hs-identifier hs-var hs-var hs-var hs-var">showsPrec</span></a></span></span><span> </span><span id="local-6989586621679074567"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679074567"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679074566"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074566"><span class="hs-identifier hs-var">ps</span></a></span></span><span> </span><span id="local-6989586621679074565"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679074565"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; String -&gt; ShowS
forall a. Show a =&gt; Int -&gt; a -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#showsPrec"><span class="hs-identifier hs-var">showsPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679074567"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; String
</span><a href="Data.ByteString.Lazy.Internal.html#unpackChars"><span class="hs-identifier hs-var">unpackChars</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074566"><span class="hs-identifier hs-var">ps</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679074565"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-114"></span><span>
</span><span id="line-115"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679074558"><span id="local-6989586621679074560"><span id="local-6989586621679074562"><span class="annot"><a href="../../base/src/GHC.Read.html#Read"><span class="hs-identifier hs-type">Read</span></a></span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-116"></span><span>    </span><span id="local-6989586621679074552"><span class="annot"><span class="annottext">readsPrec :: Int -&gt; ReadS ByteString
</span><a href="../../base/src/GHC.Read.html#readsPrec"><span class="hs-identifier hs-var hs-var hs-var hs-var">readsPrec</span></a></span></span><span> </span><span id="local-6989586621679074550"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679074550"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679074549"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679074549"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#packChars"><span class="hs-identifier hs-var">packChars</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679074548"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679074547"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679074548"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679074548"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679074547"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679074547"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Int -&gt; ReadS String
forall a. Read a =&gt; Int -&gt; ReadS a
</span><a href="../../base/src/GHC.Read.html#readsPrec"><span class="hs-identifier hs-var">readsPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679074550"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679074549"><span class="hs-identifier hs-var">str</span></a></span><span> </span><span class="hs-special">]</span><span class="hs-cpp">

#if MIN_VERSION_base(4,7,0)
</span><span class="hs-comment">-- | @since 0.10.12.0</span><span>
</span><span id="line-120"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679074544"><span class="annot"><a href="../../base/src/GHC.Exts.html#IsList"><span class="hs-identifier hs-type">IsList</span></a></span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-121"></span><span>  </span><span class="hs-keyword">type</span><span> </span><span id="Item"><span class="annot"><a href="../../base/src/GHC.Exts.html#Item"><span class="hs-identifier hs-var">Item</span></a></span></span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span>
</span><span id="line-122"></span><span>  </span><span id="local-6989586621679074541"><span class="annot"><span class="annottext">fromList :: [Item ByteString] -&gt; ByteString
</span><a href="../../base/src/GHC.Exts.html#fromList"><span class="hs-identifier hs-var hs-var hs-var hs-var">fromList</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Word8] -&gt; ByteString
[Item ByteString] -&gt; ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#packBytes"><span class="hs-identifier hs-var">packBytes</span></a></span><span>
</span><span id="line-123"></span><span>  </span><span id="local-6989586621679074540"><span class="annot"><span class="annottext">toList :: ByteString -&gt; [Item ByteString]
</span><a href="../../base/src/GHC.Exts.html#toList"><span class="hs-identifier hs-var hs-var hs-var hs-var">toList</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; [Word8]
ByteString -&gt; [Item ByteString]
</span><a href="Data.ByteString.Lazy.Internal.html#unpackBytes"><span class="hs-identifier hs-var">unpackBytes</span></a></span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-126"></span><span class="hs-comment">-- | Beware: 'fromString' truncates multi-byte characters to octets.</span><span>
</span><span id="line-127"></span><span class="hs-comment">-- e.g. &quot;&#26543;&#26422;&#12395;&#28879;&#12398;&#12392;&#12414;&#12426;&#12369;&#12426;&#31179;&#12398;&#26286;&quot; becomes &#65533;6k&#65533;nh~&#65533;Q&#65533;&#65533;n&#65533;</span><span>
</span><span id="line-128"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../base/src/Data.String.html#IsString"><span class="hs-identifier hs-type">IsString</span></a></span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-129"></span><span>    </span><span id="local-6989586621679074536"><span class="annot"><span class="annottext">fromString :: String -&gt; ByteString
</span><a href="../../base/src/Data.String.html#fromString"><span class="hs-identifier hs-var hs-var hs-var hs-var">fromString</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#packChars"><span class="hs-identifier hs-var">packChars</span></a></span><span>
</span><span id="line-130"></span><span>
</span><span id="line-131"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679074510"><span id="local-6989586621679074512"><span id="local-6989586621679074514"><span id="local-6989586621679074516"><span id="local-6989586621679074518"><span id="local-6989586621679074520"><span id="local-6989586621679074522"><span id="local-6989586621679074524"><span id="local-6989586621679074526"><span id="local-6989586621679074528"><span class="annot"><a href="../../base/src/Data.Data.html#Data"><span class="hs-identifier hs-type">Data</span></a></span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span></span></span></span></span></span></span></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-132"></span><span>  </span><span id="local-6989586621679074504"><span class="annot"><span class="annottext">gfoldl :: forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; ByteString -&gt; c ByteString
</span><a href="../../base/src/Data.Data.html#gfoldl"><span class="hs-identifier hs-var hs-var hs-var hs-var">gfoldl</span></a></span></span><span> </span><span id="local-6989586621679074502"><span class="annot"><span class="annottext">forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b
</span><a href="#local-6989586621679074502"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679074501"><span class="annot"><span class="annottext">forall g. g -&gt; c g
</span><a href="#local-6989586621679074501"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span id="local-6989586621679074500"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074500"><span class="hs-identifier hs-var">txt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([Word8] -&gt; ByteString) -&gt; c ([Word8] -&gt; ByteString)
forall g. g -&gt; c g
</span><a href="#local-6989586621679074501"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">[Word8] -&gt; ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#packBytes"><span class="hs-identifier hs-var">packBytes</span></a></span><span> </span><span class="annot"><span class="annottext">c ([Word8] -&gt; ByteString) -&gt; [Word8] -&gt; c ByteString
forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b
</span><a href="#local-6989586621679074502"><span class="hs-operator hs-var">`f`</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; [Word8]
</span><a href="Data.ByteString.Lazy.Internal.html#unpackBytes"><span class="hs-identifier hs-var">unpackBytes</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074500"><span class="hs-identifier hs-var">txt</span></a></span><span>
</span><span id="line-133"></span><span>  </span><span id="local-6989586621679074497"><span class="annot"><span class="annottext">toConstr :: ByteString -&gt; Constr
</span><a href="../../base/src/Data.Data.html#toConstr"><span class="hs-identifier hs-var hs-var hs-var hs-var">toConstr</span></a></span></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><span class="hs-identifier">_</span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Constr
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Data.ByteString.Lazy.ByteString.toConstr&quot;</span></span><span>
</span><span id="line-134"></span><span>  </span><span id="local-6989586621679074492"><span class="annot"><span class="annottext">gunfold :: forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c ByteString
</span><a href="../../base/src/Data.Data.html#gunfold"><span class="hs-identifier hs-var hs-var hs-var hs-var">gunfold</span></a></span></span><span> </span><span class="annot"><span class="annottext">forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">forall r. r -&gt; c r
</span><span class="hs-identifier">_</span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Constr -&gt; c ByteString
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Data.ByteString.Lazy.ByteString.gunfold&quot;</span></span><span>
</span><span id="line-135"></span><span>  </span><span id="local-6989586621679074490"><span class="annot"><span class="annottext">dataTypeOf :: ByteString -&gt; DataType
</span><a href="../../base/src/Data.Data.html#dataTypeOf"><span class="hs-identifier hs-var hs-var hs-var hs-var">dataTypeOf</span></a></span></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; DataType
</span><a href="../../base/src/Data.Data.html#mkNoRepType"><span class="hs-identifier hs-var">mkNoRepType</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Data.ByteString.Lazy.ByteString&quot;</span></span><span>
</span><span id="line-136"></span><span>
</span><span id="line-137"></span><span class="hs-comment">------------------------------------------------------------------------</span><span>
</span><span id="line-138"></span><span class="hs-comment">-- Packing and unpacking from lists</span><span>
</span><span id="line-139"></span><span>
</span><span id="line-140"></span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#packBytes"><span class="hs-identifier hs-type">packBytes</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span>
</span><span id="line-141"></span><span id="packBytes"><span class="annot"><span class="annottext">packBytes :: [Word8] -&gt; ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#packBytes"><span class="hs-identifier hs-var hs-var">packBytes</span></a></span></span><span> </span><span id="local-6989586621679074488"><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679074488"><span class="hs-identifier hs-var">cs0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-142"></span><span>    </span><span class="annot"><span class="annottext">Int -&gt; [Word8] -&gt; ByteString
</span><a href="#local-6989586621679074487"><span class="hs-identifier hs-var">packChunks</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">32</span></span><span> </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679074488"><span class="hs-identifier hs-var">cs0</span></a></span><span>
</span><span id="line-143"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-144"></span><span>    </span><span id="local-6989586621679074487"><span class="annot"><span class="annottext">packChunks :: Int -&gt; [Word8] -&gt; ByteString
</span><a href="#local-6989586621679074487"><span class="hs-identifier hs-var hs-var">packChunks</span></a></span></span><span> </span><span id="local-6989586621679074483"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679074483"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679074482"><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679074482"><span class="hs-identifier hs-var">cs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [Word8] -&gt; (ByteString, [Word8])
</span><a href="Data.ByteString.Internal.html#packUptoLenBytes"><span class="hs-identifier hs-var">S.packUptoLenBytes</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679074483"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679074482"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-145"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621679074480"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074480"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#chunk"><span class="hs-identifier hs-var">chunk</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074480"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>
</span><span id="line-146"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621679074479"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074479"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679074478"><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679074478"><span class="hs-identifier hs-var">cs'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-var">Chunk</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074479"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; [Word8] -&gt; ByteString
</span><a href="#local-6989586621679074487"><span class="hs-identifier hs-var">packChunks</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Classes.html#min"><span class="hs-identifier hs-var">min</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679074483"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="Data.ByteString.Lazy.Internal.html#smallChunkSize"><span class="hs-identifier hs-var">smallChunkSize</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679074478"><span class="hs-identifier hs-var">cs'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-147"></span><span>
</span><span id="line-148"></span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#packChars"><span class="hs-identifier hs-type">packChars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span>
</span><span id="line-149"></span><span id="packChars"><span class="annot"><span class="annottext">packChars :: String -&gt; ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#packChars"><span class="hs-identifier hs-var hs-var">packChars</span></a></span></span><span> </span><span id="local-6989586621679074475"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679074475"><span class="hs-identifier hs-var">cs0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; String -&gt; ByteString
</span><a href="#local-6989586621679074474"><span class="hs-identifier hs-var">packChunks</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">32</span></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679074475"><span class="hs-identifier hs-var">cs0</span></a></span><span>
</span><span id="line-150"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-151"></span><span>    </span><span id="local-6989586621679074474"><span class="annot"><span class="annottext">packChunks :: Int -&gt; String -&gt; ByteString
</span><a href="#local-6989586621679074474"><span class="hs-identifier hs-var hs-var">packChunks</span></a></span></span><span> </span><span id="local-6989586621679074470"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679074470"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679074469"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679074469"><span class="hs-identifier hs-var">cs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int -&gt; String -&gt; (ByteString, String)
</span><a href="Data.ByteString.Internal.html#packUptoLenChars"><span class="hs-identifier hs-var">S.packUptoLenChars</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679074470"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679074469"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-152"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621679074467"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074467"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#chunk"><span class="hs-identifier hs-var">chunk</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074467"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>
</span><span id="line-153"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621679074466"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074466"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679074465"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679074465"><span class="hs-identifier hs-var">cs'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-var">Chunk</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074466"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; String -&gt; ByteString
</span><a href="#local-6989586621679074474"><span class="hs-identifier hs-var">packChunks</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Classes.html#min"><span class="hs-identifier hs-var">min</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679074470"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="Data.ByteString.Lazy.Internal.html#smallChunkSize"><span class="hs-identifier hs-var">smallChunkSize</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679074465"><span class="hs-identifier hs-var">cs'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-154"></span><span>
</span><span id="line-155"></span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#unpackBytes"><span class="hs-identifier hs-type">unpackBytes</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-156"></span><span id="unpackBytes"><span class="annot"><span class="annottext">unpackBytes :: ByteString -&gt; [Word8]
</span><a href="Data.ByteString.Lazy.Internal.html#unpackBytes"><span class="hs-identifier hs-var hs-var">unpackBytes</span></a></span></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-157"></span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#unpackBytes"><span class="hs-identifier hs-var">unpackBytes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-type">Chunk</span></a></span><span> </span><span id="local-6989586621679074464"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074464"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679074463"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074463"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; [Word8] -&gt; [Word8]
</span><a href="Data.ByteString.Internal.html#unpackAppendBytesLazy"><span class="hs-identifier hs-var">S.unpackAppendBytesLazy</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074464"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; [Word8]
</span><a href="Data.ByteString.Lazy.Internal.html#unpackBytes"><span class="hs-identifier hs-var">unpackBytes</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074463"><span class="hs-identifier hs-var">cs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-158"></span><span>
</span><span id="line-159"></span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#unpackChars"><span class="hs-identifier hs-type">unpackChars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-160"></span><span id="unpackChars"><span class="annot"><span class="annottext">unpackChars :: ByteString -&gt; String
</span><a href="Data.ByteString.Lazy.Internal.html#unpackChars"><span class="hs-identifier hs-var hs-var">unpackChars</span></a></span></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-161"></span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#unpackChars"><span class="hs-identifier hs-var">unpackChars</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-type">Chunk</span></a></span><span> </span><span id="local-6989586621679074461"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074461"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679074460"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074460"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ShowS
</span><a href="Data.ByteString.Internal.html#unpackAppendCharsLazy"><span class="hs-identifier hs-var">S.unpackAppendCharsLazy</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074461"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; String
</span><a href="Data.ByteString.Lazy.Internal.html#unpackChars"><span class="hs-identifier hs-var">unpackChars</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074460"><span class="hs-identifier hs-var">cs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-162"></span><span>
</span><span id="line-163"></span><span class="hs-comment">------------------------------------------------------------------------</span><span>
</span><span id="line-164"></span><span>
</span><span id="line-165"></span><span class="hs-comment">-- | The data type invariant:</span><span>
</span><span id="line-166"></span><span class="hs-comment">-- Every ByteString is either 'Empty' or consists of non-null 'S.ByteString's.</span><span>
</span><span id="line-167"></span><span class="hs-comment">-- All functions must preserve this, and the QC properties must check this.</span><span>
</span><span id="line-168"></span><span class="hs-comment">--</span><span>
</span><span id="line-169"></span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#invariant"><span class="hs-identifier hs-type">invariant</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-170"></span><span id="invariant"><span class="annot"><span class="annottext">invariant :: ByteString -&gt; Bool
</span><a href="Data.ByteString.Lazy.Internal.html#invariant"><span class="hs-identifier hs-var hs-var">invariant</span></a></span></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>                     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-171"></span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#invariant"><span class="hs-identifier hs-var">invariant</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-type">Chunk</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.ByteString.Internal.html#PS"><span class="hs-identifier hs-type">S.PS</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignPtr Word8
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679074457"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679074457"><span class="hs-identifier hs-var">len</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679074456"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074456"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679074457"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Bool
</span><a href="Data.ByteString.Lazy.Internal.html#invariant"><span class="hs-identifier hs-var">invariant</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074456"><span class="hs-identifier hs-var">cs</span></a></span><span>
</span><span id="line-172"></span><span>
</span><span id="line-173"></span><span class="hs-comment">-- | In a form that checks the invariant lazily.</span><span>
</span><span id="line-174"></span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#checkInvariant"><span class="hs-identifier hs-type">checkInvariant</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span>
</span><span id="line-175"></span><span id="checkInvariant"><span class="annot"><span class="annottext">checkInvariant :: ByteString -&gt; ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#checkInvariant"><span class="hs-identifier hs-var hs-var">checkInvariant</span></a></span></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>
</span><span id="line-176"></span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#checkInvariant"><span class="hs-identifier hs-var">checkInvariant</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-type">Chunk</span></a></span><span> </span><span id="local-6989586621679074453"><span class="annot"><span class="annottext">c :: ByteString
</span><a href="#local-6989586621679074453"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Data.ByteString.Internal.html#PS"><span class="hs-identifier hs-type">S.PS</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignPtr Word8
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679074452"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679074452"><span class="hs-identifier hs-var">len</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679074451"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074451"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-177"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679074452"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-var">Chunk</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074453"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#checkInvariant"><span class="hs-identifier hs-var">checkInvariant</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074451"><span class="hs-identifier hs-var">cs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-178"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; ByteString
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; ByteString) -&gt; String -&gt; ByteString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Data.ByteString.Lazy: invariant violation:&quot;</span></span><span>
</span><span id="line-179"></span><span>               </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-var">Chunk</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074453"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074451"><span class="hs-identifier hs-var">cs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-180"></span><span>
</span><span id="line-181"></span><span class="hs-comment">------------------------------------------------------------------------</span><span>
</span><span id="line-182"></span><span>
</span><span id="line-183"></span><span class="hs-comment">-- | Smart constructor for 'Chunk'. Guarantees the data type invariant.</span><span>
</span><span id="line-184"></span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#chunk"><span class="hs-identifier hs-type">chunk</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Internal.html#ByteString"><span class="hs-identifier hs-type">S.ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span>
</span><span id="line-185"></span><span id="chunk"><span class="annot"><span class="annottext">chunk :: ByteString -&gt; ByteString -&gt; ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#chunk"><span class="hs-identifier hs-var hs-var">chunk</span></a></span></span><span> </span><span id="local-6989586621679074449"><span class="annot"><span class="annottext">c :: ByteString
</span><a href="#local-6989586621679074449"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Data.ByteString.Internal.html#PS"><span class="hs-identifier hs-type">S.PS</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignPtr Word8
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679074448"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679074448"><span class="hs-identifier hs-var">len</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679074447"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074447"><span class="hs-identifier hs-var">cs</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679074448"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074447"><span class="hs-identifier hs-var">cs</span></a></span><span>
</span><span id="line-186"></span><span>                          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-var">Chunk</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074449"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074447"><span class="hs-identifier hs-var">cs</span></a></span><span>
</span><span id="line-187"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#chunk"><span class="hs-pragma hs-type">chunk</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-188"></span><span>
</span><span id="line-189"></span><span class="hs-comment">-- | Consume the chunks of a lazy ByteString with a natural right fold.</span><span>
</span><span id="line-190"></span><span id="local-6989586621679074741"><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#foldrChunks"><span class="hs-identifier hs-type">foldrChunks</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.ByteString.Internal.html#ByteString"><span class="hs-identifier hs-type">S.ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679074741"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679074741"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679074741"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679074741"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-191"></span><span id="foldrChunks"><span class="annot"><span class="annottext">foldrChunks :: forall a. (ByteString -&gt; a -&gt; a) -&gt; a -&gt; ByteString -&gt; a
</span><a href="Data.ByteString.Lazy.Internal.html#foldrChunks"><span class="hs-identifier hs-var hs-var">foldrChunks</span></a></span></span><span> </span><span id="local-6989586621679074446"><span class="annot"><span class="annottext">ByteString -&gt; a -&gt; a
</span><a href="#local-6989586621679074446"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679074445"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679074445"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; a
</span><a href="#local-6989586621679074444"><span class="hs-identifier hs-var">go</span></a></span><span>
</span><span id="line-192"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679074444"><span class="annot"><span class="annottext">go :: ByteString -&gt; a
</span><a href="#local-6989586621679074444"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679074445"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-193"></span><span>        </span><span class="annot"><a href="#local-6989586621679074444"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-type">Chunk</span></a></span><span> </span><span id="local-6989586621679074443"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074443"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679074442"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074442"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; a -&gt; a
</span><a href="#local-6989586621679074446"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074443"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; a
</span><a href="#local-6989586621679074444"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074442"><span class="hs-identifier hs-var">cs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-194"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#foldrChunks"><span class="hs-pragma hs-type">foldrChunks</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-195"></span><span>
</span><span id="line-196"></span><span class="hs-comment">-- | Consume the chunks of a lazy ByteString with a strict, tail-recursive,</span><span>
</span><span id="line-197"></span><span class="hs-comment">-- accumulating left fold.</span><span>
</span><span id="line-198"></span><span id="local-6989586621679074739"><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#foldlChunks"><span class="hs-identifier hs-type">foldlChunks</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679074739"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.ByteString.Internal.html#ByteString"><span class="hs-identifier hs-type">S.ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679074739"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679074739"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679074739"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-199"></span><span id="foldlChunks"><span class="annot"><span class="annottext">foldlChunks :: forall a. (a -&gt; ByteString -&gt; a) -&gt; a -&gt; ByteString -&gt; a
</span><a href="Data.ByteString.Lazy.Internal.html#foldlChunks"><span class="hs-identifier hs-var hs-var">foldlChunks</span></a></span></span><span> </span><span id="local-6989586621679074439"><span class="annot"><span class="annottext">a -&gt; ByteString -&gt; a
</span><a href="#local-6989586621679074439"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679074438"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679074438"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; ByteString -&gt; a
</span><a href="#local-6989586621679074437"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679074438"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-200"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679074437"><span class="annot"><span class="annottext">go :: a -&gt; ByteString -&gt; a
</span><a href="#local-6989586621679074437"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679074436"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679074436"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679074436"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Prim.html#seq"><span class="hs-operator hs-var">`seq`</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
forall a. HasCallStack =&gt; a
</span><a href="../../base/src/GHC.Err.html#undefined"><span class="hs-identifier hs-var">undefined</span></a></span><span>
</span><span id="line-201"></span><span>        </span><span class="annot"><a href="#local-6989586621679074437"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621679074434"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679074434"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679074434"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-202"></span><span>        </span><span class="annot"><a href="#local-6989586621679074437"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621679074433"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679074433"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-type">Chunk</span></a></span><span> </span><span id="local-6989586621679074432"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074432"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679074431"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074431"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; ByteString -&gt; a
</span><a href="#local-6989586621679074437"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; ByteString -&gt; a
</span><a href="#local-6989586621679074439"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679074433"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074432"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074431"><span class="hs-identifier hs-var">cs</span></a></span><span>
</span><span id="line-203"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#foldlChunks"><span class="hs-pragma hs-type">foldlChunks</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-204"></span><span>
</span><span id="line-205"></span><span class="hs-comment">------------------------------------------------------------------------</span><span>
</span><span id="line-206"></span><span>
</span><span id="line-207"></span><span class="hs-comment">-- The representation uses lists of packed chunks. When we have to convert from</span><span>
</span><span id="line-208"></span><span class="hs-comment">-- a lazy list to the chunked representation, then by default we use this</span><span>
</span><span id="line-209"></span><span class="hs-comment">-- chunk size. Some functions give you more control over the chunk size.</span><span>
</span><span id="line-210"></span><span class="hs-comment">--</span><span>
</span><span id="line-211"></span><span class="hs-comment">-- Measurements here:</span><span>
</span><span id="line-212"></span><span class="hs-comment">--  http://www.cse.unsw.edu.au/~dons/tmp/chunksize_v_cache.png</span><span>
</span><span id="line-213"></span><span class="hs-comment">--</span><span>
</span><span id="line-214"></span><span class="hs-comment">-- indicate that a value around 0.5 to 1 x your L2 cache is best.</span><span>
</span><span id="line-215"></span><span class="hs-comment">-- The following value assumes people have something greater than 128k,</span><span>
</span><span id="line-216"></span><span class="hs-comment">-- and need to share the cache with other programs.</span><span>
</span><span id="line-217"></span><span>
</span><span id="line-218"></span><span class="hs-comment">-- | The chunk size used for I\/O. Currently set to 32k, less the memory management overhead</span><span>
</span><span id="line-219"></span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#defaultChunkSize"><span class="hs-identifier hs-type">defaultChunkSize</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-220"></span><span id="defaultChunkSize"><span class="annot"><span class="annottext">defaultChunkSize :: Int
</span><a href="Data.ByteString.Lazy.Internal.html#defaultChunkSize"><span class="hs-identifier hs-var hs-var">defaultChunkSize</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">32</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679074430"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="Data.ByteString.Lazy.Internal.html#chunkOverhead"><span class="hs-identifier hs-var">chunkOverhead</span></a></span><span>
</span><span id="line-221"></span><span>   </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679074430"><span class="annot"><span class="annottext">k :: Int
</span><a href="#local-6989586621679074430"><span class="hs-identifier hs-var hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1024</span></span><span>
</span><span id="line-222"></span><span>
</span><span id="line-223"></span><span class="hs-comment">-- | The recommended chunk size. Currently set to 4k, less the memory management overhead</span><span>
</span><span id="line-224"></span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#smallChunkSize"><span class="hs-identifier hs-type">smallChunkSize</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-225"></span><span id="smallChunkSize"><span class="annot"><span class="annottext">smallChunkSize :: Int
</span><a href="Data.ByteString.Lazy.Internal.html#smallChunkSize"><span class="hs-identifier hs-var hs-var">smallChunkSize</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679074428"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="Data.ByteString.Lazy.Internal.html#chunkOverhead"><span class="hs-identifier hs-var">chunkOverhead</span></a></span><span>
</span><span id="line-226"></span><span>   </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679074428"><span class="annot"><span class="annottext">k :: Int
</span><a href="#local-6989586621679074428"><span class="hs-identifier hs-var hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1024</span></span><span>
</span><span id="line-227"></span><span>
</span><span id="line-228"></span><span class="hs-comment">-- | The memory management overhead. Currently this is tuned for GHC only.</span><span>
</span><span id="line-229"></span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#chunkOverhead"><span class="hs-identifier hs-type">chunkOverhead</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-230"></span><span id="chunkOverhead"><span class="annot"><span class="annottext">chunkOverhead :: Int
</span><a href="Data.ByteString.Lazy.Internal.html#chunkOverhead"><span class="hs-identifier hs-var hs-var">chunkOverhead</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int
forall a. Storable a =&gt; a -&gt; Int
</span><a href="../../base/src/Foreign.Storable.html#sizeOf"><span class="hs-identifier hs-var">sizeOf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
forall a. HasCallStack =&gt; a
</span><a href="../../base/src/GHC.Err.html#undefined"><span class="hs-identifier hs-var">undefined</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-231"></span><span>
</span><span id="line-232"></span><span class="hs-comment">------------------------------------------------------------------------</span><span>
</span><span id="line-233"></span><span class="hs-comment">-- Implementations for Eq, Ord and Monoid instances</span><span>
</span><span id="line-234"></span><span>
</span><span id="line-235"></span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#eq"><span class="hs-identifier hs-type">eq</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-236"></span><span id="eq"><span class="annot"><span class="annottext">eq :: ByteString -&gt; ByteString -&gt; Bool
</span><a href="Data.ByteString.Lazy.Internal.html#eq"><span class="hs-identifier hs-var hs-var">eq</span></a></span></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-237"></span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#eq"><span class="hs-identifier hs-var">eq</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><span class="hs-identifier">_</span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-238"></span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#eq"><span class="hs-identifier hs-var">eq</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><span class="hs-identifier">_</span></span><span>     </span><span class="annot"><span class="annottext">ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-239"></span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#eq"><span class="hs-identifier hs-var">eq</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-type">Chunk</span></a></span><span> </span><span id="local-6989586621679074426"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074426"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679074425"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074425"><span class="hs-keyword hs-var">as</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-type">Chunk</span></a></span><span> </span><span id="local-6989586621679074424"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074424"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679074423"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074423"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-240"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><a href="../../ghc-prim/src/GHC.Classes.html#compare"><span class="hs-identifier hs-var">compare</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; Int
</span><a href="Data.ByteString.html#length"><span class="hs-identifier hs-var">S.length</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074426"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; Int
</span><a href="Data.ByteString.html#length"><span class="hs-identifier hs-var">S.length</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074424"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-241"></span><span>    </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#LT"><span class="hs-identifier hs-var">LT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074426"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; ByteString -&gt; ByteString
</span><a href="Data.ByteString.html#take"><span class="hs-identifier hs-var">S.take</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; Int
</span><a href="Data.ByteString.html#length"><span class="hs-identifier hs-var">S.length</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074426"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074424"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; Bool
</span><a href="Data.ByteString.Lazy.Internal.html#eq"><span class="hs-identifier hs-var">eq</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074425"><span class="hs-keyword hs-var">as</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-var">Chunk</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; ByteString -&gt; ByteString
</span><a href="Data.ByteString.html#drop"><span class="hs-identifier hs-var">S.drop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; Int
</span><a href="Data.ByteString.html#length"><span class="hs-identifier hs-var">S.length</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074426"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074424"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074423"><span class="hs-identifier hs-var">bs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-242"></span><span>    </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#EQ"><span class="hs-identifier hs-var">EQ</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074426"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074424"><span class="hs-identifier hs-var">b</span></a></span><span>                     </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; Bool
</span><a href="Data.ByteString.Lazy.Internal.html#eq"><span class="hs-identifier hs-var">eq</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074425"><span class="hs-keyword hs-var">as</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074423"><span class="hs-identifier hs-var">bs</span></a></span><span>
</span><span id="line-243"></span><span>    </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#GT"><span class="hs-identifier hs-var">GT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; ByteString -&gt; ByteString
</span><a href="Data.ByteString.html#take"><span class="hs-identifier hs-var">S.take</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; Int
</span><a href="Data.ByteString.html#length"><span class="hs-identifier hs-var">S.length</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074424"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074426"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074424"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; Bool
</span><a href="Data.ByteString.Lazy.Internal.html#eq"><span class="hs-identifier hs-var">eq</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-var">Chunk</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; ByteString -&gt; ByteString
</span><a href="Data.ByteString.html#drop"><span class="hs-identifier hs-var">S.drop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; Int
</span><a href="Data.ByteString.html#length"><span class="hs-identifier hs-var">S.length</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074424"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074426"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074425"><span class="hs-keyword hs-var">as</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074423"><span class="hs-identifier hs-var">bs</span></a></span><span>
</span><span id="line-244"></span><span>
</span><span id="line-245"></span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#cmp"><span class="hs-identifier hs-type">cmp</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Ordering"><span class="hs-identifier hs-type">Ordering</span></a></span><span>
</span><span id="line-246"></span><span id="cmp"><span class="annot"><span class="annottext">cmp :: ByteString -&gt; ByteString -&gt; Ordering
</span><a href="Data.ByteString.Lazy.Internal.html#cmp"><span class="hs-identifier hs-var hs-var">cmp</span></a></span></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#EQ"><span class="hs-identifier hs-var">EQ</span></a></span><span>
</span><span id="line-247"></span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#cmp"><span class="hs-identifier hs-var">cmp</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><span class="hs-identifier">_</span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#LT"><span class="hs-identifier hs-var">LT</span></a></span><span>
</span><span id="line-248"></span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#cmp"><span class="hs-identifier hs-var">cmp</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><span class="hs-identifier">_</span></span><span>     </span><span class="annot"><span class="annottext">ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#GT"><span class="hs-identifier hs-var">GT</span></a></span><span>
</span><span id="line-249"></span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#cmp"><span class="hs-identifier hs-var">cmp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-type">Chunk</span></a></span><span> </span><span id="local-6989586621679074422"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074422"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679074421"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074421"><span class="hs-keyword hs-var">as</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-type">Chunk</span></a></span><span> </span><span id="local-6989586621679074420"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074420"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679074419"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074419"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-250"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><a href="../../ghc-prim/src/GHC.Classes.html#compare"><span class="hs-identifier hs-var">compare</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; Int
</span><a href="Data.ByteString.html#length"><span class="hs-identifier hs-var">S.length</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074422"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; Int
</span><a href="Data.ByteString.html#length"><span class="hs-identifier hs-var">S.length</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074420"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-251"></span><span>    </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#LT"><span class="hs-identifier hs-var">LT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><a href="../../ghc-prim/src/GHC.Classes.html#compare"><span class="hs-identifier hs-var">compare</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074422"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; ByteString -&gt; ByteString
</span><a href="Data.ByteString.html#take"><span class="hs-identifier hs-var">S.take</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; Int
</span><a href="Data.ByteString.html#length"><span class="hs-identifier hs-var">S.length</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074422"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074420"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-252"></span><span>            </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#EQ"><span class="hs-identifier hs-var">EQ</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; Ordering
</span><a href="Data.ByteString.Lazy.Internal.html#cmp"><span class="hs-identifier hs-var">cmp</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074421"><span class="hs-keyword hs-var">as</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-var">Chunk</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; ByteString -&gt; ByteString
</span><a href="Data.ByteString.html#drop"><span class="hs-identifier hs-var">S.drop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; Int
</span><a href="Data.ByteString.html#length"><span class="hs-identifier hs-var">S.length</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074422"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074420"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074419"><span class="hs-identifier hs-var">bs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-253"></span><span>            </span><span id="local-6989586621679074418"><span class="annot"><span class="annottext">Ordering
</span><a href="#local-6989586621679074418"><span class="hs-identifier hs-var">result</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="#local-6989586621679074418"><span class="hs-identifier hs-var">result</span></a></span><span>
</span><span id="line-254"></span><span>    </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#EQ"><span class="hs-identifier hs-var">EQ</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><a href="../../ghc-prim/src/GHC.Classes.html#compare"><span class="hs-identifier hs-var">compare</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074422"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074420"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-255"></span><span>            </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#EQ"><span class="hs-identifier hs-var">EQ</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; Ordering
</span><a href="Data.ByteString.Lazy.Internal.html#cmp"><span class="hs-identifier hs-var">cmp</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074421"><span class="hs-keyword hs-var">as</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074419"><span class="hs-identifier hs-var">bs</span></a></span><span>
</span><span id="line-256"></span><span>            </span><span id="local-6989586621679074417"><span class="annot"><span class="annottext">Ordering
</span><a href="#local-6989586621679074417"><span class="hs-identifier hs-var">result</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="#local-6989586621679074417"><span class="hs-identifier hs-var">result</span></a></span><span>
</span><span id="line-257"></span><span>    </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#GT"><span class="hs-identifier hs-var">GT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><a href="../../ghc-prim/src/GHC.Classes.html#compare"><span class="hs-identifier hs-var">compare</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; ByteString -&gt; ByteString
</span><a href="Data.ByteString.html#take"><span class="hs-identifier hs-var">S.take</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; Int
</span><a href="Data.ByteString.html#length"><span class="hs-identifier hs-var">S.length</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074420"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074422"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074420"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-258"></span><span>            </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#EQ"><span class="hs-identifier hs-var">EQ</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; Ordering
</span><a href="Data.ByteString.Lazy.Internal.html#cmp"><span class="hs-identifier hs-var">cmp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-var">Chunk</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; ByteString -&gt; ByteString
</span><a href="Data.ByteString.html#drop"><span class="hs-identifier hs-var">S.drop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; Int
</span><a href="Data.ByteString.html#length"><span class="hs-identifier hs-var">S.length</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074420"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074422"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074421"><span class="hs-keyword hs-var">as</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074419"><span class="hs-identifier hs-var">bs</span></a></span><span>
</span><span id="line-259"></span><span>            </span><span id="local-6989586621679074416"><span class="annot"><span class="annottext">Ordering
</span><a href="#local-6989586621679074416"><span class="hs-identifier hs-var">result</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="#local-6989586621679074416"><span class="hs-identifier hs-var">result</span></a></span><span>
</span><span id="line-260"></span><span>
</span><span id="line-261"></span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#append"><span class="hs-identifier hs-type">append</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span>
</span><span id="line-262"></span><span id="append"><span class="annot"><span class="annottext">append :: ByteString -&gt; ByteString -&gt; ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#append"><span class="hs-identifier hs-var hs-var">append</span></a></span></span><span> </span><span id="local-6989586621679074415"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074415"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span id="local-6989586621679074414"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074414"><span class="hs-identifier hs-var">ys</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(ByteString -&gt; ByteString -&gt; ByteString)
-&gt; ByteString -&gt; ByteString -&gt; ByteString
forall a. (ByteString -&gt; a -&gt; a) -&gt; a -&gt; ByteString -&gt; a
</span><a href="Data.ByteString.Lazy.Internal.html#foldrChunks"><span class="hs-identifier hs-var">foldrChunks</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-var">Chunk</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074414"><span class="hs-identifier hs-var">ys</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074415"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-263"></span><span>
</span><span id="line-264"></span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#concat"><span class="hs-identifier hs-type">concat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span>
</span><span id="line-265"></span><span id="concat"><span class="annot"><span class="annottext">concat :: [ByteString] -&gt; ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#concat"><span class="hs-identifier hs-var hs-var">concat</span></a></span></span><span> </span><span id="local-6989586621679074413"><span class="annot"><span class="annottext">[ByteString]
</span><a href="#local-6989586621679074413"><span class="hs-identifier hs-var">css0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ByteString] -&gt; ByteString
</span><a href="#local-6989586621679074412"><span class="hs-identifier hs-var">to</span></a></span><span> </span><span class="annot"><span class="annottext">[ByteString]
</span><a href="#local-6989586621679074413"><span class="hs-identifier hs-var">css0</span></a></span><span>
</span><span id="line-266"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-267"></span><span>    </span><span id="local-6989586621679074411"><span class="annot"><span class="annottext">go :: ByteString -&gt; [ByteString] -&gt; ByteString
</span><a href="#local-6989586621679074411"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>        </span><span id="local-6989586621679074410"><span class="annot"><span class="annottext">[ByteString]
</span><a href="#local-6989586621679074410"><span class="hs-identifier hs-var">css</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ByteString] -&gt; ByteString
</span><a href="#local-6989586621679074412"><span class="hs-identifier hs-var">to</span></a></span><span> </span><span class="annot"><span class="annottext">[ByteString]
</span><a href="#local-6989586621679074410"><span class="hs-identifier hs-var">css</span></a></span><span>
</span><span id="line-268"></span><span>    </span><span class="annot"><a href="#local-6989586621679074411"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-type">Chunk</span></a></span><span> </span><span id="local-6989586621679074409"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074409"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679074408"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074408"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679074407"><span class="annot"><span class="annottext">[ByteString]
</span><a href="#local-6989586621679074407"><span class="hs-identifier hs-var">css</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-var">Chunk</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074409"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; [ByteString] -&gt; ByteString
</span><a href="#local-6989586621679074411"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074408"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="annot"><span class="annottext">[ByteString]
</span><a href="#local-6989586621679074407"><span class="hs-identifier hs-var">css</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-269"></span><span>    </span><span id="local-6989586621679074412"><span class="annot"><span class="annottext">to :: [ByteString] -&gt; ByteString
</span><a href="#local-6989586621679074412"><span class="hs-identifier hs-var hs-var">to</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="Data.ByteString.Lazy.Internal.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>
</span><span id="line-270"></span><span>    </span><span class="annot"><a href="#local-6989586621679074412"><span class="hs-identifier hs-var">to</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679074406"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074406"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679074405"><span class="annot"><span class="annottext">[ByteString]
</span><a href="#local-6989586621679074405"><span class="hs-identifier hs-var">css</span></a></span></span><span class="hs-special">)</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; [ByteString] -&gt; ByteString
</span><a href="#local-6989586621679074411"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679074406"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="annot"><span class="annottext">[ByteString]
</span><a href="#local-6989586621679074405"><span class="hs-identifier hs-var">css</span></a></span><span>
</span><span id="line-271"></span></pre></body></html>